<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddPayStateAndResultOrdersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('orders', function (Blueprint $table) {
            $table->unsignedTinyInteger('result')->after('content_id')->nullable()->comment('支付结果 必填，1成功/0失败/其他未知');
            $table->unsignedTinyInteger('pay_state')->after('amount')->nullable()->comment('订购结果,包月订购时:0成功/1失败/2报停/3不可点播;按次订购时:0成功/1基础包或功能关闭/2余额不足/3其它');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
